package com.ssl.mybatisinterceptor.service.impl;

import com.ssl.mybatisinterceptor.dao.UserMapper;
import com.ssl.mybatisinterceptor.model.User;
import com.ssl.mybatisinterceptor.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 描述：
 *
 * @author shi_senlin
 * @create 2021/03/10 20:42
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public void create(User user) {
        userMapper.insertSelective(user);
    }

    @Override
    public User get(String id) {
        return userMapper.selectByPrimaryKey(id);
    }
}
